package com.sais.manage.boot.building.dto;

import com.sais.manage.boot.building.entity.Student;
import com.sais.manage.boot.platform.dto.UserInfoDTO;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

/**
 * 宿舍管理系统-学生保存DTO
 *
 * @author zwp
 * @date 2020/2/9
 */
@Data
@NoArgsConstructor
public class StudentSaveDTO {

    private String ukId;
    private String name;
    private String year;
    private String studentId;
    private String roomId;
    private String facultyId;
    private String majorId;

    private UserInfoDTO userInfoDTO;

    public Student convert(){
        Student student = new Student();
        BeanUtils.copyProperties(this, student);
        return student;
    }

}
